<template>
    <div class="light-flow-form-container">

        <div class="light-flow-form-box">
            <div class="light-flow-form-content">
                <h2 class="light-flow-form-title">登陆</h2>
                <div class="light-flow-form-item">
                    <input class="light-flow-form-input" type="text" placeholder="请输入用户名">
                </div>
                <div class="light-flow-form-item">
                    <input class="light-flow-form-input" type="password" placeholder="请输入密码">
                </div>
                <div class="light-flow-form-item">
                    <input class="light-flow-form-submit" type="submit" value="登陆">
                </div>
            </div>
        </div>
    </div>
</template>

<script>

export default {
    name: "LightFlowForm",
}
</script>

<style scoped>
.light-flow-form-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.light-flow-form-box {
    position: relative;
    width: 350px;
    height: 340px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.5s;
    z-index: 1;
}

.light-flow-form-box::after {
    content: '';
    position: absolute;
    border-radius: 15px;
    background-color: rgb(66, 64, 64);
    inset: 5px;
    z-index: -2;
}

.light-flow-form-box::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: repeating-conic-gradient(from var(--a), #45f3ff 0%,
            #45f3ff 10%, transparent 10%, transparent 80%, #45f3ff 100%);
    border-radius: 20px;
    animation: flow 2.5s linear infinite;
    z-index: -3;
}

@property --a {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

@keyframes flow {
    from {
        --a: 0deg;
    }

    to {
        --a: 360deg;
    }
}

.light-flow-form-content {
    position: absolute;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    gap: 15px;
    transition: 0.5s;
}

.light-flow-form-title {
    position: relative;
    color: #fff;
    font-size: 1.5em;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 10px;
}

.light-flow-form-item {
    position: relative;
    width: 70%;
    display: flex;
    justify-content: space-between;
}

.light-flow-form-input {
    width: 100%;
    outline: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background-color: rgba(0, 0, 0, 0.15);
    padding: 6px 15px;
    border-radius: 4px;
    font-size: 0.85em;
    color: #fff;
}

.light-flow-form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.light-flow-form-submit {
    width: 100%;
    outline: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background-color: #2196f3;
    padding: 6px 15px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.85em;
    color: #fff;
}
</style>
